<!-- HTML header for doxygen 1.9.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>COMMONS-NET: commonsNet.tftp.TFTPDataPacket类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">COMMONS-NET
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classcommonsNet_1_1tftp_1_1TFTPDataPacket.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="#pac-methods">包函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classcommonsNet_1_1tftp_1_1TFTPDataPacket-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">commonsNet.tftp.TFTPDataPacket类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>TFTPAckPacket 是从 TFTPPacket 派生的类，定义了 TFTP 数据数据包类型。  
 <a href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#details">更多...</a></p>
<div class="dynheader">
类 commonsNet.tftp.TFTPDataPacket 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classcommonsNet_1_1tftp_1_1TFTPDataPacket.png" usemap="#commonsNet.tftp.TFTPDataPacket_map" alt=""/>
  <map id="commonsNet.tftp.TFTPDataPacket_map" name="commonsNet.tftp.TFTPDataPacket_map">
<area href="classcommonsNet_1_1tftp_1_1TFTPPacket.html" title="TFTPPacket 是一个抽象类，封装了五种类型的 TFTP 数据包共有的功能。它还提供了一个静态工厂方法，用于根据数据报创建正确的 TFTP 数据包实例。" alt="commonsNet.tftp.TFTPPacket" shape="rect" coords="0,0,202,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:acbe0106e1c433b413c26c6598aa2fc66"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#acbe0106e1c433b413c26c6598aa2fc66">init</a> (destination: String, port: UInt16, blockNumber: Int32, data: Array&lt;Byte&gt;, offset: Int64, length: Int64)</td></tr>
<tr class="memdesc:acbe0106e1c433b413c26c6598aa2fc66"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个要发送到指定端口和块号的 TFTPDataPacket 对象。实际要发送的数据是通过数组、偏移量和长度传递的。如果长度大于MAX_DATA_LENGTH，则截断。  <br /></td></tr>
<tr class="separator:acbe0106e1c433b413c26c6598aa2fc66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad674593bed63b6389298c0eaed2fae27"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#ad674593bed63b6389298c0eaed2fae27">getBlockNumber</a> (): Int32</td></tr>
<tr class="memdesc:ad674593bed63b6389298c0eaed2fae27"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取数据数据包的块编号。  <br /></td></tr>
<tr class="separator:ad674593bed63b6389298c0eaed2fae27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9e105f4edd2905374511c1db48d3108"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#ad9e105f4edd2905374511c1db48d3108">getData</a> (): Array&lt;Byte&gt;</td></tr>
<tr class="memdesc:ad9e105f4edd2905374511c1db48d3108"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回存储数据的数组。  <br /></td></tr>
<tr class="separator:ad9e105f4edd2905374511c1db48d3108"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a263860d7fa6f65298e2bf157c8b55f9c"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a263860d7fa6f65298e2bf157c8b55f9c">getDataLength</a> (): Int64</td></tr>
<tr class="memdesc:a263860d7fa6f65298e2bf157c8b55f9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取在数组中数据的长度。  <br /></td></tr>
<tr class="separator:a263860d7fa6f65298e2bf157c8b55f9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d3b83689ee11215edf1942b11719154"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a2d3b83689ee11215edf1942b11719154">getDataOffset</a> (): Int64</td></tr>
<tr class="memdesc:a2d3b83689ee11215edf1942b11719154"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取数据在数组中的偏移量。  <br /></td></tr>
<tr class="separator:a2d3b83689ee11215edf1942b11719154"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68e8029cc2a813de8d35c532c17b90f3"><td class="memItemLeft" align="right" valign="top">public override func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a68e8029cc2a813de8d35c532c17b90f3">newData</a> (): Array&lt;Byte&gt;</td></tr>
<tr class="memdesc:a68e8029cc2a813de8d35c532c17b90f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个包含 TFTP 数据数据包所有数据的 UDP 数据报文，按照正确的格式组织。  <br /></td></tr>
<tr class="separator:a68e8029cc2a813de8d35c532c17b90f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebcbc230bedce8654b20668e2916cc95"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#aebcbc230bedce8654b20668e2916cc95">setBlockNumber</a> (blockNumber: Int32): Unit</td></tr>
<tr class="memdesc:aebcbc230bedce8654b20668e2916cc95"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据数据包的块编号  <br /></td></tr>
<tr class="separator:aebcbc230bedce8654b20668e2916cc95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a421c5e05add74a10d8b82bc89261557d"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a421c5e05add74a10d8b82bc89261557d">setData</a> (data: Array&lt;Byte&gt;, offset: Int64, length: Int64): Unit</td></tr>
<tr class="memdesc:a421c5e05add74a10d8b82bc89261557d"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据数据包中的数据。  <br /></td></tr>
<tr class="separator:a421c5e05add74a10d8b82bc89261557d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ed776760b2cf19b0ebe4460e5e2b6bc"><td class="memItemLeft" align="right" valign="top">public override func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a0ed776760b2cf19b0ebe4460e5e2b6bc">toString</a> (): String</td></tr>
<tr class="memdesc:a0ed776760b2cf19b0ebe4460e5e2b6bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">用于调试，返回对象的字符串表示，包括类型、块编号、数据长度。  <br /></td></tr>
<tr class="separator:a0ed776760b2cf19b0ebe4460e5e2b6bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public static func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a449be75d783028d271f3e1af62f970a9">newTFTPPacket</a> (datagram: Array&lt;Byte&gt;, address: String, port: UInt16): <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">TFTPPacket</a></td></tr>
<tr class="memdesc:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">当接收到一个预期为 TFTP 数据包的数据报时，使用此工厂方法创建正确的 TFTPPacket 对象，封装在该数据报中的数据。  <br /></td></tr>
<tr class="separator:a449be75d783028d271f3e1af62f970a9 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#af865694cdd78af54d3d0775a887cf5ed">getAddress</a> (): String</td></tr>
<tr class="memdesc:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取数据包的来源或将要发送的目标主机地址。  <br /></td></tr>
<tr class="separator:af865694cdd78af54d3d0775a887cf5ed inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a27e7a619dfec5ab08d65079a57c58657">getPort</a> (): UInt16</td></tr>
<tr class="memdesc:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取数据包的来源或将要发送的目标端口。  <br /></td></tr>
<tr class="separator:a27e7a619dfec5ab08d65079a57c58657 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a0ac725cc37ddee6a29e93c6d16205f73">getPacketType</a> (): Int64</td></tr>
<tr class="memdesc:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回数据包的类型。  <br /></td></tr>
<tr class="separator:a0ac725cc37ddee6a29e93c6d16205f73 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a5e78b2bfd31eec2d9b33ead235374370">newData</a> (): Array&lt;Byte&gt;</td></tr>
<tr class="memdesc:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个正确格式的 TFTP 数据包数据。  <br /></td></tr>
<tr class="separator:a5e78b2bfd31eec2d9b33ead235374370 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a027e8d3541a9ff74cf75639a1251d092">setAddress</a> (address: String): Unit</td></tr>
<tr class="memdesc:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据包要发送到的主机地址。  <br /></td></tr>
<tr class="separator:a027e8d3541a9ff74cf75639a1251d092 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ab907b12cf65da8783e9dfb81ea18e5c4">setPort</a> (port: UInt16): Unit</td></tr>
<tr class="memdesc:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据包要发送的端口。  <br /></td></tr>
<tr class="separator:ab907b12cf65da8783e9dfb81ea18e5c4 inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">public open func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a4aad5bc8e980f2256d2bbe3baa9d746b">toString</a> (): String</td></tr>
<tr class="memdesc:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">用于调试，返回对象的字符串表示，包括地址、端口、类型。  <br /></td></tr>
<tr class="separator:a4aad5bc8e980f2256d2bbe3baa9d746b inherit pub_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ad38e5e8a32b56d6134a513395165344f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#ad38e5e8a32b56d6134a513395165344f">static let MAX_DATA_LENGTH</a> : Int64 = 512</td></tr>
<tr class="memdesc:ad38e5e8a32b56d6134a513395165344f"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 数据数据包的最大长度，为512字节。  <br /></td></tr>
<tr class="separator:ad38e5e8a32b56d6134a513395165344f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdd77378f3236238e02c7081d9adbef7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#acdd77378f3236238e02c7081d9adbef7">static let MIN_DATA_LENGTH</a> : Int64 = 0</td></tr>
<tr class="memdesc:acdd77378f3236238e02c7081d9adbef7"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 数据数据包的最小长度，为0字节。  <br /></td></tr>
<tr class="separator:acdd77378f3236238e02c7081d9adbef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada8fdfda03ab0325df45f8b675fb4181"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#ada8fdfda03ab0325df45f8b675fb4181">var length</a> : Int64 = 0</td></tr>
<tr class="memdesc:ada8fdfda03ab0325df45f8b675fb4181"><td class="mdescLeft">&#160;</td><td class="mdescRight">数据的长度。  <br /></td></tr>
<tr class="separator:ada8fdfda03ab0325df45f8b675fb4181"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47cada4ab2f7f420e8ae2b03da1a123b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a47cada4ab2f7f420e8ae2b03da1a123b">var offset</a> : Int64 = 0</td></tr>
<tr class="memdesc:a47cada4ab2f7f420e8ae2b03da1a123b"><td class="mdescLeft">&#160;</td><td class="mdescRight">数据在数组中的偏移量。  <br /></td></tr>
<tr class="separator:a47cada4ab2f7f420e8ae2b03da1a123b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;Public 属性 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a1b9d01dc44fc4d498b613e4c8f0b606d">static let READ_REQUEST</a> = 1;</td></tr>
<tr class="memdesc:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于1。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示读请求数据包。  <br /></td></tr>
<tr class="separator:a1b9d01dc44fc4d498b613e4c8f0b606d inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ae400dc7ae167e2886890feefe6b9385e">static let WRITE_REQUEST</a> = 2;</td></tr>
<tr class="memdesc:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于2。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示写请求数据包。  <br /></td></tr>
<tr class="separator:ae400dc7ae167e2886890feefe6b9385e inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#a8f98d56c20097453a986157c881bf5ea">static let DATA</a> = 3;</td></tr>
<tr class="memdesc:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于3。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示数据数据包。  <br /></td></tr>
<tr class="separator:a8f98d56c20097453a986157c881bf5ea inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#aef344f92fab5c92ba4cc7794804bbbc0">static let ACKNOWLEDGEMENT</a> = 4;</td></tr>
<tr class="memdesc:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于4。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示确认数据包。  <br /></td></tr>
<tr class="separator:aef344f92fab5c92ba4cc7794804bbbc0 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#aa636305b5ea4afa869b03bdad53fa2e9">static let ERROR</a> = 5;</td></tr>
<tr class="memdesc:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 规范标识符，等于5。 <code><a class="el" href="">getType()</a></code> 返回的标识符，表示错误数据包。  <br /></td></tr>
<tr class="separator:aa636305b5ea4afa869b03bdad53fa2e9 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ae23de23646555553bcebb5a748af38c5">static let SEGMENT_SIZE</a> = 512;</td></tr>
<tr class="memdesc:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">TFTP 数据包的最大段大小，为 512 字节。  <br /></td></tr>
<tr class="separator:ae23de23646555553bcebb5a748af38c5 inherit pub_attribs_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pac-methods" name="pac-methods"></a>
包函数</h2></td></tr>
<tr class="memitem:a8bf435f90350fabf9d2353848814fff4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a8bf435f90350fabf9d2353848814fff4">init</a> (data: Array&lt;Byte&gt;, address: IPSocketAddress)</td></tr>
<tr class="memdesc:a8bf435f90350fabf9d2353848814fff4"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据接收到的数据创建一个 TFTPDataPacket 对象。  <br /></td></tr>
<tr class="separator:a8bf435f90350fabf9d2353848814fff4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a153d7dc06907836f23ffb98ec2cc49c0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a153d7dc06907836f23ffb98ec2cc49c0">init</a> (destination: String, port: UInt16, blockNumber: Int32, data: Array&lt;Byte&gt;)</td></tr>
<tr class="memdesc:a153d7dc06907836f23ffb98ec2cc49c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个 TFTPDataPacket 对象，用于向指定端口的主机发送指定数据。  <br /></td></tr>
<tr class="separator:a153d7dc06907836f23ffb98ec2cc49c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td colspan="2" onclick="javascript:toggleInherit('pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket')"><img src="closed.png" alt="-"/>&#160;包函数 继承自 <a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html">commonsNet.tftp.TFTPPacket</a></td></tr>
<tr class="memitem:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPPacket.html#ad3f5a4b401a490faa07781b1565a6b74">init</a> (packettype: Int64, address: String, port: UInt16)</td></tr>
<tr class="memdesc:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个 TFTPPacket 对象。  <br /></td></tr>
<tr class="separator:ad3f5a4b401a490faa07781b1565a6b74 inherit pac_methods_classcommonsNet_1_1tftp_1_1TFTPPacket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a32e3534d7782ac0b96457bc26d38e4ad"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#a32e3534d7782ac0b96457bc26d38e4ad">var blockNumber</a> : Int32 = 0</td></tr>
<tr class="memdesc:a32e3534d7782ac0b96457bc26d38e4ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">数据包的块编号。  <br /></td></tr>
<tr class="separator:a32e3534d7782ac0b96457bc26d38e4ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8da3ce0e6261f983955b585ab8d8c7f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html#ad8da3ce0e6261f983955b585ab8d8c7f">var data</a> : Array&lt;Byte&gt; = Array&lt;Byte&gt;()</td></tr>
<tr class="memdesc:ad8da3ce0e6261f983955b585ab8d8c7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">存储数据的数组。  <br /></td></tr>
<tr class="separator:ad8da3ce0e6261f983955b585ab8d8c7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>TFTPAckPacket 是从 TFTPPacket 派生的类，定义了 TFTP 数据数据包类型。 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a8bf435f90350fabf9d2353848814fff4" name="a8bf435f90350fabf9d2353848814fff4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8bf435f90350fabf9d2353848814fff4">&#9670;&#160;</a></span>init() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPDataPacket.init </td>
          <td>(</td>
          <td class="paramname"><em>data</em>:&#160;</td>
          <td class="paramtype">Array&lt;Byte&gt;, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>address</em>:&#160;</td>
          <td class="paramtype">IPSocketAddress&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">package</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>根据接收到的数据创建一个 TFTPDataPacket 对象。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>接收到的数据 @para address 数据报文来源的远程地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">TFTPPacketException</td><td>如果数据报文不是有效的 TFTP 数据数据包 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a153d7dc06907836f23ffb98ec2cc49c0" name="a153d7dc06907836f23ffb98ec2cc49c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a153d7dc06907836f23ffb98ec2cc49c0">&#9670;&#160;</a></span>init() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPDataPacket.init </td>
          <td>(</td>
          <td class="paramname"><em>destination</em>:&#160;</td>
          <td class="paramtype">String, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>port</em>:&#160;</td>
          <td class="paramtype">UInt16, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>blockNumber</em>:&#160;</td>
          <td class="paramtype">Int32, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>data</em>:&#160;</td>
          <td class="paramtype">Array&lt;Byte&gt;&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">package</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>创建一个 TFTPDataPacket 对象，用于向指定端口的主机发送指定数据。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">destination</td><td>要发送数据包的目标主机 </td></tr>
    <tr><td class="paramname">port</td><td>发送数据包的目标端口 </td></tr>
    <tr><td class="paramname">blockNumber</td><td>数据包的块编号 </td></tr>
    <tr><td class="paramname">data</td><td>要发送的数据所在的数组 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="acbe0106e1c433b413c26c6598aa2fc66" name="acbe0106e1c433b413c26c6598aa2fc66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbe0106e1c433b413c26c6598aa2fc66">&#9670;&#160;</a></span>init() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public commonsNet.tftp.TFTPDataPacket.init </td>
          <td>(</td>
          <td class="paramname"><em>destination</em>:&#160;</td>
          <td class="paramtype">String, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>port</em>:&#160;</td>
          <td class="paramtype">UInt16, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>blockNumber</em>:&#160;</td>
          <td class="paramtype">Int32, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>data</em>:&#160;</td>
          <td class="paramtype">Array&lt;Byte&gt;, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>offset</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>length</em>:&#160;</td>
          <td class="paramtype">Int64&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建一个要发送到指定端口和块号的 TFTPDataPacket 对象。实际要发送的数据是通过数组、偏移量和长度传递的。如果长度大于MAX_DATA_LENGTH，则截断。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">destination</td><td>要发送数据包的目标主机 </td></tr>
    <tr><td class="paramname">port</td><td>发送数据包的目标端口 </td></tr>
    <tr><td class="paramname">blockNumber</td><td>数据包的块编号 </td></tr>
    <tr><td class="paramname">data</td><td>要发送的数据所在的数组 </td></tr>
    <tr><td class="paramname">offset</td><td>数据在数组中的偏移量 </td></tr>
    <tr><td class="paramname">length</td><td>数据的长度 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ad674593bed63b6389298c0eaed2fae27" name="ad674593bed63b6389298c0eaed2fae27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad674593bed63b6389298c0eaed2fae27">&#9670;&#160;</a></span>getBlockNumber()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.tftp.TFTPDataPacket.getBlockNumber </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Int32 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取数据数据包的块编号。 </p>
<dl class="section return"><dt>返回</dt><dd>块编号 </dd></dl>

</div>
</div>
<a id="ad9e105f4edd2905374511c1db48d3108" name="ad9e105f4edd2905374511c1db48d3108"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9e105f4edd2905374511c1db48d3108">&#9670;&#160;</a></span>getData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.tftp.TFTPDataPacket.getData </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Array&lt;Byte&gt; </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回存储数据的数组。 </p>
<dl class="section return"><dt>返回</dt><dd>返回存储数据的数组 </dd></dl>

</div>
</div>
<a id="a263860d7fa6f65298e2bf157c8b55f9c" name="a263860d7fa6f65298e2bf157c8b55f9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a263860d7fa6f65298e2bf157c8b55f9c">&#9670;&#160;</a></span>getDataLength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.tftp.TFTPDataPacket.getDataLength </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Int64 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取在数组中数据的长度。 </p>
<dl class="section return"><dt>返回</dt><dd>数组中数据的长度 </dd></dl>

</div>
</div>
<a id="a2d3b83689ee11215edf1942b11719154" name="a2d3b83689ee11215edf1942b11719154"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d3b83689ee11215edf1942b11719154">&#9670;&#160;</a></span>getDataOffset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.tftp.TFTPDataPacket.getDataOffset </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Int64 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取数据在数组中的偏移量。 </p>
<dl class="section return"><dt>返回</dt><dd>数据在数组中的偏移量 </dd></dl>

</div>
</div>
<a id="a68e8029cc2a813de8d35c532c17b90f3" name="a68e8029cc2a813de8d35c532c17b90f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68e8029cc2a813de8d35c532c17b90f3">&#9670;&#160;</a></span>newData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public override func commonsNet.tftp.TFTPDataPacket.newData </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Array&lt;Byte&gt; </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建一个包含 TFTP 数据数据包所有数据的 UDP 数据报文，按照正确的格式组织。 </p>
<dl class="section return"><dt>返回</dt><dd>包含 TFTP 数据数据包的 UDP 数据报文 </dd></dl>

</div>
</div>
<a id="aebcbc230bedce8654b20668e2916cc95" name="aebcbc230bedce8654b20668e2916cc95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebcbc230bedce8654b20668e2916cc95">&#9670;&#160;</a></span>setBlockNumber()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.tftp.TFTPDataPacket.setBlockNumber </td>
          <td>(</td>
          <td class="paramname"><em>blockNumber</em>:&#160;</td>
          <td class="paramtype">Int32</td><td>)</td>
          <td>: Unit </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置数据数据包的块编号 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">要设置的块编号</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a421c5e05add74a10d8b82bc89261557d" name="a421c5e05add74a10d8b82bc89261557d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a421c5e05add74a10d8b82bc89261557d">&#9670;&#160;</a></span>setData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.tftp.TFTPDataPacket.setData </td>
          <td>(</td>
          <td class="paramname"><em>data</em>:&#160;</td>
          <td class="paramtype">Array&lt;Byte&gt;, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>offset</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>length</em>:&#160;</td>
          <td class="paramtype">Int64&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>: Unit </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置数据数据包中的数据。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>数组中包含的数据 </td></tr>
    <tr><td class="paramname">offset</td><td>数据在数组中的偏移量 </td></tr>
    <tr><td class="paramname">length</td><td>数据的长度 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0ed776760b2cf19b0ebe4460e5e2b6bc" name="a0ed776760b2cf19b0ebe4460e5e2b6bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ed776760b2cf19b0ebe4460e5e2b6bc">&#9670;&#160;</a></span>toString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public override func commonsNet.tftp.TFTPDataPacket.toString </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: String </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>用于调试，返回对象的字符串表示，包括类型、块编号、数据长度。 </p>
<dl class="section return"><dt>返回</dt><dd>返回表示对象的字符串 </dd></dl>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="ad38e5e8a32b56d6134a513395165344f" name="ad38e5e8a32b56d6134a513395165344f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad38e5e8a32b56d6134a513395165344f">&#9670;&#160;</a></span>static let MAX_DATA_LENGTH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPDataPacket.static let MAX_DATA_LENGTH : Int64 = 512</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>TFTP 数据数据包的最大长度，为512字节。 </p>

</div>
</div>
<a id="acdd77378f3236238e02c7081d9adbef7" name="acdd77378f3236238e02c7081d9adbef7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdd77378f3236238e02c7081d9adbef7">&#9670;&#160;</a></span>static let MIN_DATA_LENGTH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPDataPacket.static let MIN_DATA_LENGTH : Int64 = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>TFTP 数据数据包的最小长度，为0字节。 </p>

</div>
</div>
<a id="a32e3534d7782ac0b96457bc26d38e4ad" name="a32e3534d7782ac0b96457bc26d38e4ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32e3534d7782ac0b96457bc26d38e4ad">&#9670;&#160;</a></span>var blockNumber</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPDataPacket.var blockNumber : Int32 = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>数据包的块编号。 </p>

</div>
</div>
<a id="ad8da3ce0e6261f983955b585ab8d8c7f" name="ad8da3ce0e6261f983955b585ab8d8c7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8da3ce0e6261f983955b585ab8d8c7f">&#9670;&#160;</a></span>var data</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPDataPacket.var data : Array&lt;Byte&gt; = Array&lt;Byte&gt;()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>存储数据的数组。 </p>

</div>
</div>
<a id="ada8fdfda03ab0325df45f8b675fb4181" name="ada8fdfda03ab0325df45f8b675fb4181"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada8fdfda03ab0325df45f8b675fb4181">&#9670;&#160;</a></span>var length</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPDataPacket.var length : Int64 = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>数据的长度。 </p>

</div>
</div>
<a id="a47cada4ab2f7f420e8ae2b03da1a123b" name="a47cada4ab2f7f420e8ae2b03da1a123b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47cada4ab2f7f420e8ae2b03da1a123b">&#9670;&#160;</a></span>var offset</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.tftp.TFTPDataPacket.var offset : Int64 = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>数据在数组中的偏移量。 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/tftp/<a class="el" href="tftp__data__packet_8cj.html">tftp_data_packet.cj</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.9.6-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacecommonsNet.html">commonsNet</a></li><li class="navelem"><a class="el" href="namespacecommonsNet_1_1tftp.html">tftp</a></li><li class="navelem"><a class="el" href="classcommonsNet_1_1tftp_1_1TFTPDataPacket.html">TFTPDataPacket</a></li>
    <li class="footer">制作者 <img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
